/* SPDX-License-Identifier: GPL-2.0 */
/*
 *
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 * Description: XHCI driver Vendor Hooks
 */

#ifndef DRIVERS_USB_HOST_XHCI_HCD_EXT_H
#define DRIVERS_USB_HOST_XHCI_HCD_EXT_H

#ifdef CONFIG_NETBIOS_USB_HOST_XHCI_SPEC
#include "xhci.h"

#if !defined(XHCI_HCD_EXT_H) || defined(TRACE_HEADER_MULTI_READ)
#define XHCI_HCD_EXT_H
void trace_usb_xhci_error_count(int ret);
void trace_usb_xhci_set_irqflag(unsigned long *irqflag);
int trace_usb_xhci_fw_download(struct usb_hcd *hcd);
int trace_usb_xhci_fw_reload(struct usb_hcd *hcd);
void trace_usb_xhci_fw_unload(struct usb_hcd *hcd);
#endif

#else

#include <linux/tracepoint.h>
struct usb_hcd;

DECLARE_EVENT_NOP(usb_xhci_error_count,
					TP_PROTO(int ret),
					TP_ARGS(ret));

DECLARE_EVENT_NOP(usb_xhci_set_irqflag,
					TP_PROTO(unsigned long *irqflag),
					TP_ARGS(irqflag));

static inline int trace_usb_xhci_fw_download(struct usb_hcd *hcd)
{
	return 0;
}

static inline int trace_usb_xhci_fw_reload(struct usb_hcd *hcd)
{
	return 0;
}

DECLARE_EVENT_NOP(usb_xhci_fw_unload,
					TP_PROTO(struct usb_hcd *hcd),
					TP_ARGS(hcd));
#endif

#endif
